﻿using System;
using System.Collections.Generic;
using System.Text;
using Tauren.Business.Entity.Enum;

namespace Tauren.Business.Entity.Output
{
    public class Dictionary_OutPut : Model.Dictionary
    {
        /// <summary>
        /// 创建人显示名
        /// </summary>
        public virtual string Dic_Creator { get; set; }

        /// <summary>
        /// 修改人显示名
        /// </summary>
        public virtual string Dic_Modifier { get; set; }
        /// <summary>
        /// 创建日期-显示
        /// </summary>
        public virtual string Dic_Creatdate { get; set; }
        /// <summary>
        /// 修改日期-显示
        /// </summary>
        public virtual string Dic_Modifdate { get; set; }
        public virtual List<DictionaryRes_OutPut> Res { get; set; } = new List<DictionaryRes_OutPut>();
        public virtual DictionaryType dictionaryType
        {
            get
            {
                if (Type is null) return DictionaryType.other;
                return (DictionaryType)System.Enum.Parse(typeof(DictionaryType), Type);
            }
        }
        public string GetIcons()
        {
            string res = "";
            switch (dictionaryType)
            {
                case DictionaryType.flow:
                    res = "el-icon-lx-sort";
                    break;
                case DictionaryType.emp:
                    res = "el-icon-user-solid";
                    break;
                case DictionaryType.org:
                    res = "el-icon-office-building";
                    break;
                case DictionaryType.pos:
                    res = "el-icon-table-lamp";
                    break;
                default:
                    break;
            }
            return res;
        }
    }

    public class DictionaryRes_OutPut : Model.DictionaryRes
    {

    }
    public class PageDictionaryTable : Global.GlobalOutPut
    {
        public virtual long RowNo { get; set; }
        public virtual long AutoId { get; set; }
        public virtual long ParentId { get; set; }
        public virtual string ParentName { get; set; }
        public virtual string Code { get; set; }
        public virtual string Name { get; set; }
        public virtual string Type { get; set; }
        public virtual bool Enable { get; set; }
        public virtual string Dic_Creator { get; set; }
        public virtual string Dic_Creatdate { get; set; }
        public virtual string Dic_Enable { get; set; }

    }
}
